﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TalentPool.master" %>
<%@ Import Namespace="TalentPools.Model" %>
<%@ Import Namespace="TalentPools.BLL" %>
<script runat="server">

    protected void btnlogin_Click(object sender, ImageClickEventArgs e)
    {
        string name = txtname.Text.ToString();
        string pass = txtpass.Text.ToString();
        if (new LoginManager().getlogin(name, pass))
        {
            Session["username"] = name;
            Session["userid"] = new LoginManager().getidByname(name);
        }
        else
        {
            Page.ClientScript.RegisterClientScriptBlock(typeof(string), "", "alert('登录失败')", true);
        }
    }

    protected void btnres_Click(object sender, ImageClickEventArgs e)
    {
        Response.Redirect("~/resiger.aspx");
    }

    protected void btnsreach_Click(object sender, ImageClickEventArgs e)
    {
        string workCatagory = "";
        string workYear = "";

        string keyword = Request.Form["keyword"];
        if (keyword == "输入行业/技能关键字")
        {
            keyword = "";
        }
    }
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="css/Index.css" rel="stylesheet" type="text/css" />
    <link href="JQuerySelect/css/common.css" rel="stylesheet" type="text/css" />
    <script src="JQuerySelect/js/Selector.js" type="text/javascript"></script>
    <link href="JQuerySelect/css/boxy.css" rel="stylesheet" type="text/css" />
    <script src="JQuerySelect/js/city.js" type="text/javascript"></script>
    <script src="JQuerySelect/js/industry.js" type="text/javascript"></script>
    <script src="JQuerySelect/js/job.js" type="text/javascript"></script>
    <script src="JQuerySelect/js/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="JQuerySelect/js/jquery.boxy.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#<%=txtjobarea.ClientID %>").click(function () {
                Boxy.area("d1,d2", "1,724", function (val, val1) {
                    $("#<%=txtjobarea.ClientID %>").val(val);
                    $("#<%=txtjobarea1.ClientID %>").val(val1);
                }, { title: "工作地区选择器" });
                return false;
            });
            $("#<%=txtProfession.ClientID %>").click(function () {
                Boxy.job("s1,b2", "23", function (val, val1) {
                    $("#<%=txtProfession.ClientID %>").val(val);
                    $("#<%=txtProfession1.ClientID %>").val(val1);
                }, { title: "职位类别选择器" });
                return false;
            });
        });
    </script>
    <script type="text/javascript">
        $(function () {
            var str = '<%=Session["userid"]%>';
            var strn = '<%=Session["username"] %>';
            if (str == "") {
                $("#login").css("display", "");
                $("#logined").css("display", "none");
            }
            else {
                $("#logined").css("display", "");
                $("#login").css("display", "none");
                $("#ajname").html(strn);
            }
            $("#btnlogin").click(function () {
                if ($("#txtpass").val() == "" && $("#txtname").val() == "") {
                    $("#name").css("display", "");
                    $("#pass").css("display", "");
                    return false;
                }
                else if ($("#txtpass").val() == "") {
                    $("#pass").css("display", "");
                    return false;
                }
                else if ($("#txtname").val() == "") {
                    $("#name").css("display", "");
                    return false;
                }
            });
            $("#txtname").blur(function () {
                if ($(this).val() != "") {
                    $("#name").css("display", "none");
                }
            });
            $("#txtpass").blur(function () {
                if ($(this).val() != "") {
                    $("#pass").css("display", "none");
                }

            });

        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="width: 970px; margin: 0 auto; background-color:#fff;" class="context">
        <div class="left_context">
            <div id="login" class="small_context">
                <h3 class="form_head">
                    用户登录
                </h3>
                <div>
                    <table>
                        <tr>
                            <td>
                                用户名：
                            </td>
                            <td>
                                <asp:TextBox ID="txtname" runat="server" Width="120px"></asp:TextBox><span style="color: Red;
                                    display: none;" id="name">*</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                密码：
                            </td>
                            <td>
                                <asp:TextBox ID="txtpass" TextMode="Password" runat="server" Width="120px"></asp:TextBox><span
                                    style="color: Red; display: none;" id="pass">*</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:ImageButton ID="btnlogin" runat="server" ImageUrl="~/img/login.gif" 
                                    Style="height: 19px" onclick="btnlogin_Click" />
                            </td>
                            <td>
                                <asp:ImageButton ID="btnres" runat="server" ImageUrl="~/img/resi.gif" 
                                    Style="height: 19px" onclick="btnres_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div id="logined" style="border: 1px solid  #ace; margin: 5px; width: 210px; height: 104px;">
                <table style="width: 183px; height: 80px; margin: 0 auto; text-align:left;">
                    <tr>
                        <td>
                            欢迎回来
                        </td>
                        <td>
                            <span id="ajname" style="color: Red;"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <a href="#">谁看过我的简历</a>
                        </td>
                        <td>
                            <a href="">刷新简历</a>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <a href="Person/Default.aspx">简历管理</a>
                        </td>
                        <td>
                            <a href="#">人事经理来信</a>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="small_context" style="float: left; margin-top: 15px;">
                <h3 class="form_head">
                    资讯</h3>
                <ul>
                    <li><a target="_blank" href="http://article.zhaopin.com/pub/view/196643-25986.html">
                        我国拟加强社会工作人才培</a></li>
                    <li><a target="_blank" href="http://article.zhaopin.com/pub/view/196642-25986.html">
                        金融业毕业生人均月薪超7千</a></li>
                    <li><a target="_blank" href="http://article.zhaopin.com/pub/view/196641-25986.html">
                        企业“越冬”需要善待从业</a></li>
                    <li><a target="_blank" href="http://article.zhaopin.com/pub/view/196598-25986.html">
                        蚁族”日渐扩大不可漠视</a></li>
                    <li><a target="_blank" href="http://article.zhaopin.com/pub/view/196597-25986.html">
                        社保记录明年起免费寄送个</a></li>
                    <li><a target="_blank" href="http://article.zhaopin.com/pub/view/196596-25986.html">
                        为何万元高薪还是难招人才</a></li>
                    <li><a target="_blank" href="http://article.zhaopin.com/pub/view/196571-25986.html">
                        全国就业质量排名北京居首</a></li>
                    <li><a target="_blank" href="http://article.zhaopin.com/pub/view/196570-25986.html">
                        涨工资最能提升公众幸福感</a></li>
                    <li><a target="_blank" href="http://article.zhaopin.com/pub/view/196569-25986.html">
                        大学毕业生辛多薪少引热议</a></li>
                </ul>
            </div>
        </div>
        <div class="right_context">
            <div>
                <h3 class="form_head">
                    人才搜索</h3>
                <table>
                    <tr>
                        <td>
                            人才类别:
                        </td>
                        <td>
                            <div style="display: none">
                                <asp:TextBox ID="txtProfession1" runat="server" BorderStyle="None" Width="195px"></asp:TextBox></div>
                            <asp:TextBox ID="txtProfession" runat="server" Width="195px"></asp:TextBox>
                        </td>
                        <td>
                            工作地点:
                        </td>
                        <td>
                            <div style="display: none">
                                <asp:TextBox ID="txtjobarea1" runat="server" BorderStyle="None" Width="195px"></asp:TextBox></div>
                            <asp:TextBox ID="txtjobarea" runat="server"
                                Width="195px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            工作年限:
                        </td>
                        <td style="text-align: left;">
                            <asp:DropDownList ID="drpyear" runat="server" Width="100px">
                                <asp:ListItem>不限</asp:ListItem>
                                <asp:ListItem>1年</asp:ListItem>
                                <asp:ListItem>2年</asp:ListItem>
                                <asp:ListItem>3年</asp:ListItem>
                                <asp:ListItem>4年以上</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                            关 键 字:
                        </td>
                        <td>
                            <input maxlength="20" style="height: 20px; width: 94px;" type="text" name="keyword"
                                onblur="if(this.value=='') this.value='输入行业/技能关键字';" onfocus="if(this.value=='输入行业/技能关键字') this.value='';"
                                value="输入行业/技能关键字" />
                            <asp:ImageButton ID="btnsreach" runat="server" CssClass="txtBox" 
                                ImageUrl="~/img/17.gif" onclick="btnsreach_Click" />
                        </td>
                    </tr>
                </table>
            </div>
            <div style="height: 13px; width: inherit;">
            </div>
            <div id="result">
                <asp:Repeater ID="rpSearch" runat="server">
                    <HeaderTemplate>
                        <table>
                            <tr>
                                <td class="title_resumeList0">
                                    编号
                                </td>
                                <td class="title_resumeList1">
                                    性别
                                </td>
                                <td class="title_resumeList2">
                                    工作时间
                                </td>
                                <td class="title_resumeList3">
                                    工作类别
                                </td>
                                <td class="title_resumeList4">
                                    精通技术
                                </td>
                                <td class="title_resumeList5">
                                    意向工作地点
                                </td>
                            </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblSearchResult" runat="server" Text="对不起，没有找到您想要的结果... ..." ForeColor="Red"
                            Visible="false"></asp:Label>
                        <tr>
                            <td class="title_resumeList0">
                                <%#new WebManager.BasePage().CutString(Eval("id").ToString(),5) %>
                            </td>
                            <td class="title_resumeList1">
                                <%#Eval("sex") %>
                            </td>
                            <td class="title_resumeList2">
                                <%#Eval("WorkYear") %>
                            </td>
                            <td class="title_resumeList3">
                                <%#Eval("industry") %>
                            </td>
                            <td class="title_resumeList4">
                                <%#Eval("PSName") %>
                            </td>
                            <td class="title_resumeList5">
                                <%#Eval("area") %>
                            </td>
                        </tr>
                        <hr style="margin: 0px; border-bottom: 1px dashed #F4F9FC; height: 1px; width: 95%;
                            text-align: center;" />
                    </ItemTemplate>
                    <FooterTemplate>
                        </table></FooterTemplate>
                </asp:Repeater>
            </div>
        </div>
    </div>
</asp:Content>
